﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GcmpGuiInterface.h"
#include "GcmpApiDeclaration.h"

namespace gcmp
{
    class ElementId;

    /// \brief 材质选择对话框监听
    class GCMP_GUI_INTERFACE_EXPORT IMaterialSelectionDialogListener
    {
    public:
        virtual ~IMaterialSelectionDialogListener() {}
    
    public:

        /// \brief 响应“应用材质”事件
        /// 
        /// 当材质选择对话框点击确定按钮或应用按钮，且选中了项目库中的材质时，响应此事件
        /// \param materialId 材质选择对话框界面当前选中的材质
        /// \param isConfirmButtonClicked 是否按下了确定按钮，true：按下确定按钮，false：按下应用按钮
        virtual void OnApplyMaterial(const ElementId& materialId, bool isConfirmButtonClicked) = 0;
      
        /// \brief 响应“对话框关闭”事件
        ///
        /// 当材质选择对话框点击确认或右上角关闭按钮时响应此事件
        /// \param isConfirmButtonClicked 是否按下了确定按钮，true：按下确定按钮，false：按下右上角关闭按钮
        virtual void OnCloseDialog(bool isConfirmButtonClicked) = 0;
    };
}



